#ifndef CCPARTICLESYSTEM_EXT_H
#define CCPARTICLESYSTEM_EXT_H
#include "cocos2d.h"

using namespace cocos2d;

class CCParticleSystem_Ext : public CCNode
{
public:
    CCParticleSystem *last;
    CCParticleSystem * m_current;

    
    void reloadParticle(char * file)
    {
        last = m_current;
		last->stopSystem();
		
	    newParticle(file);
    }

	void newParticle(char * file)
	{
		m_current = CCParticleSystemQuad::particleWithFile(file);
		m_current->autorelease();
		this->addChild(m_current);
	}

    
    CCParticleSystem_Ext(char * file)
    {
		newParticle(file);
        this->autorelease();
    }
    CCParticleSystem_Ext();
};

#endif // CCPARTICLESYSTEM_EXT_H
